package com.ruoyi.xiaoshou.service;

import java.util.List;

import com.ruoyi.IndexDtoByTwo;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.store.StockIn;
import com.ruoyi.xiaoshou.domain.SaleBack;
import com.ruoyi.xiaoshou.domain.SaleOrder;
import com.ruoyi.xiaoshou.dto.SaleBackDto;

import java.util.List;

/**
 * 销售退货单Service接口
 *
 * @author lmj
 * @date 2024-10-29
 */
public interface ISaleBackService {
    /**
     * 生成退货订单
         *
     */
    public AjaxResult addSaleBack(int saleBackRequestId, String userId);
    public IndexDtoByTwo getSaleBackCountAndMoney();
    /**
     * 查询销售退货单
     *
     * @param id 销售退货单主键
     * @return 销售退货单
     */
    public SaleBack selectSaleBackById(Integer id);

    /**
     * 查询销售退货单列表
     *
     * @param saleBack 销售退货单
     * @return 销售退货单集合
     */
    public List<SaleBack> selectSaleBackList(SaleBack saleBack);
    public List<SaleBack> noReconList(SaleBack saleBack);
    List<SaleBack> selectSaleBackListForReciveOrder(SaleBack saleBack);
    public List<SaleBack> getUseList(SaleBack saleBack);
    List<SaleBack> getSaleBackListByOrderCodes(String[] codes);

    /**
     * 新增销售退货单
     *
     * @param saleBackDto 销售退货单
     * @return 结果
     */
    public AjaxResult insertSaleBack(SaleBackDto saleBackDto);

    String refreshStatusByStockIn(StockIn stockIn);

    /**
     * 修改销售退货单
     *
     * @param saleBackDto 销售退货单
     * @return 结果
     */
    public AjaxResult updateSaleBack(SaleBackDto saleBackDto);

    AjaxResult checkSaleBack(SaleBack saleBack);

    /**
     * 批量删除销售退货单
     *
     * @param ids 需要删除的销售退货单主键集合
     * @return 结果
     */
    public AjaxResult deleteSaleBackByIds(Integer[] ids);

    /**
     * 删除销售退货单信息
     *
     * @param id 销售退货单主键
     * @return 结果
     */
    public int deleteSaleBackById(Integer id);

    int updateSaleBackyCode(SaleBack saleBack);
}
